package com.management.vtribe.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class DataStatistics {
    @Autowired
    ArticleService articleService;

    @Scheduled(cron = "1 0 0 * * ?")
    public void pvStatisticsPerDay(){
        System.out.println("当前时间："+new Date());
        articleService.pvIncrements();
        articleService.pvStatisticsPerDay();
    }
}
